﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Xml;

namespace ImageEditor.DataManagement
{
    class XMLManager
    {
        public XMLManager() { }

        public static ArrayList GetXMLNodeLists(String URL, String[] TagNames)
        {
            ArrayList nodeLists = new ArrayList();
            XmlDocument document = new XmlDocument();
            XmlTextReader reader = new XmlTextReader(URL);
            reader.WhitespaceHandling = WhitespaceHandling.Significant;
            document.Load(reader);
            foreach (String tagname in TagNames)
            {
                nodeLists.Add(document.GetElementsByTagName(tagname));
            }
            return nodeLists;
        }
    }
}
